package com.application.lucky.bean.jsonBean;

import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.Nullable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;

import java.util.Objects;

@Entity
public class GroupListbean implements Parcelable {

    /**
     * roomTypeId : 1
     * roomTypeName : 5元房
     * roomTypePic :
     * money : 500
     */
    @Id(autoincrement = true)
    private long dbID;
    private String roomTypeId;
    private String roomTypeName;
    private String roomTypePic;
    private int money;
    private String roomTypeDesc;

    public long getDbID() {
        return dbID;
    }

    public void setDbID(long dbID) {
        this.dbID = dbID;
    }

    public GroupListbean(Parcel in) {
        roomTypeId = in.readString();
        roomTypeName = in.readString();
        roomTypePic = in.readString();
        money = in.readInt();
        roomTypeDesc = in.readString();
    }

    @Generated(hash = 2042192102)
    public GroupListbean(long dbID, String roomTypeId, String roomTypeName,
            String roomTypePic, int money, String roomTypeDesc) {
        this.dbID = dbID;
        this.roomTypeId = roomTypeId;
        this.roomTypeName = roomTypeName;
        this.roomTypePic = roomTypePic;
        this.money = money;
        this.roomTypeDesc = roomTypeDesc;
    }

    @Generated(hash = 1773078411)
    public GroupListbean() {
    }



    public static final Creator<GroupListbean> CREATOR = new Creator<GroupListbean>() {
        @Override
        public GroupListbean createFromParcel(Parcel in) {
            return new GroupListbean(in);
        }

        @Override
        public GroupListbean[] newArray(int size) {
            return new GroupListbean[size];
        }
    };

    public String getRoomTypeDesc() {
        return roomTypeDesc;
    }

    public void setRoomTypeDesc(String roomTypeDesc) {
        this.roomTypeDesc = roomTypeDesc;
    }

    public String getRoomTypeId() {
        return roomTypeId;
    }

    public void setRoomTypeId(String roomTypeId) {
        this.roomTypeId = roomTypeId;
    }

    public String getRoomTypeName() {
        return roomTypeName;
    }

    public void setRoomTypeName(String roomTypeName) {
        this.roomTypeName = roomTypeName;
    }

    public String getRoomTypePic() {
        return roomTypePic;
    }

    public void setRoomTypePic(String roomTypePic) {
        this.roomTypePic = roomTypePic;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.roomTypeId);
        dest.writeString(this.roomTypeName);
        dest.writeString(this.roomTypePic);
        dest.writeInt(this.money);
        dest.writeString(this.roomTypeDesc);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GroupListbean listbean = (GroupListbean) o;
        return Objects.equals(roomTypeId, listbean.roomTypeId);
    }
}
